package com.web_bloks.types.client;

/**
 * IProperty interface
 * 
 * A value of 'null' means the property value isn't set
 * 
 * @author Jean-Lou Dupont
 *
 */
public interface IProperty extends IPropertyMeta {
	
	/**
	 * Returns the property's key
	 * 
	 * @return key
	 */
	public String getKey();
	
	/**
	 * Sets the property's value
	 * 
	 * @param value
	 * @throws IPropertyException
	 */
	public void setValue(Object value) throws IPropertyException;
	
	/**
	 * Sets the property value. The field's
	 * type can be inspected through <code>getValueType</code>.
	 * 
	 * @return Object 
	 */
	public Object getValue();
	
	/**
	 * Returns the class type of the property value
	 * 
	 * @return klass type
	 */
	@SuppressWarnings("unchecked")
	public Class getValueType();
	
	/**
	 * Returns the meta information
	 * 
	 * @return metas
	 */
	public EPropertyMeta[] getMeta();
	
	/**
	 * Changed status
	 *  
	 * @return boolean
	 */
	public boolean isDirty();
	
	/**
	 * Resets the dirty status
	 */
	public void clearDirty();
	
	
}//